package zuoye2;

public class Student<T> {
    private String name;//名字
    private T sex;//性别
    private int age;//年龄

    public Student() {
    }

    public Student(String name, T sex, int age) {
        this.name = name;
        this.sex = sex;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public T getSex() {
        return sex;
    }

    public void setSex(T sex) {
        this.sex = sex;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "学生" +
                "姓名：" + name +
                ", 性别" + sex +
                ", 年龄" + age
                ;
    }
}
